#include <iostream>
#include <string>
#include "../headers/inv.h"

using namespace std;

Inventory::Inventory(int start_amount) {
    m_food = start_amount;
}

int Inventory::AddFood(int add_qty) {
    add_qty /= 2;
    m_food += add_qty;
    return add_qty;
}

int Inventory::UseFood(int use_qty) {
    if (m_food == 0) {
        return 1;
    } else {
        m_food -= use_qty;
        return 0;
    }
}

int Inventory::GetFood() {
    return m_food;
}

